package com.bizfx.component.controls
{
	import com.bizfx.utils.DateUtils;
	
	import mx.controls.DateField;
	import mx.formatters.DateFormatter;

	public class SearchBarDateFieldValueInput extends DateField implements ISearchBarValueInput
	{
		public function SearchBarDateFieldValueInput() {
			this.editable = true;
			this.restrict = "\-\0-9";
		}
		
		public function get inputValue():Object {
			return super.selectedDate;
		}
		
		public function set inputValue(value:Object):void {
			super.selectedDate = value as Date;
		}
		
		public function get inputValueString():String {
			return DateUtils.DateToString(super.selectedDate);
		}
	}
}